m1dl <- readRDS("Work/m1dl_forJAGS.rds")

main1.1946.jags.params <- c("b")

main1.1946.jags.inits <- list(list(b = rep(0, 13)),
                              list(b = rep(0, 13)),
                              list(b = rep(0, 13)),
                              list(b = rep(0, 13)))

library("dclone")

cl <- makePSOCKcluster(4)
main1.1946.fitjags.par <- jags.parfit(cl = cl,
                                      data = m1dl,
                                      params = main1.1946.jags.params,
                                      model = "m1_jags.jags",
                                      inits = main1.1946.jags.inits,
                                      n.chains = 4,
                                      n.iter = 10000, n.burnin = 2000, n.thin = 10)

saveRDS(main1.1946.fitjags.par, file = "Work/main1jags1946.rds")
